package com.njbdqn.mybuy.dao;

import java.util.List;

import org.njbdqn.mybuy.database.SqlTemplate;

import com.njbdqn.mybuy.entity.Userinfos;

public class UserinfosDAO {
	private SqlTemplate template;
	public UserinfosDAO(){
		template = new SqlTemplate();
	}	
	
	public List<Userinfos> login(Userinfos user){
		String sql="select * from userinfos where username=? and password=?";
		return template.resultToArray(sql, new Object[]{user.getUsername(),user.getPassword()},Userinfos.class);
	}
}
